<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var person = [{name: 'kevin'}, {name: 'daisy'}, {name: 'silu'}]
        var arrName = person.map(item => item.name)
        console.log(arrName)
        // curry 函数：
        var prop = curry(function(key,obj) {
            return obj[key]
        })
        var name = person.map(prop('name'))
        console.log(name)
        // slice(0) 可以用作数组的深拷贝方法
        var deepPerson = person.slice(0)
        console.log(person)
        deepPerson.sort((a,b) => {
            return b.name -a.name
        })
        console.log(deepPerson)
            function demo(a,b) {
                console.log(b)
            }
            demo(1)
    </script>
</body>
</html>